<template>
  <div class="py-2 h-[80vh] flex flex-col">
    <h2 class="text-lg text-zinc-900 px-1 mb-2 font-bold">所有分类</h2>
    <ul class="overflow-y-scroll">
      <li
        @click="$emit('popupClickItem', index)"
        v-for="(item, index) in $store.getters.category"
        :key="item.id"
        class="
          text-lg text-zinc-900
          px-1
          py-1.5
          duration-100
          active:bg-zinc-100
        "
      >
        {{ item.name }}
      </li>
    </ul>
  </div>
</template>

<script setup>
defineProps({});
// 官网建议 所有的emit都在注册
defineEmits(["clickItem"]);
</script>

<style>
</style>